<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('Cemetery/index')}">{:lang('ADMIN_CEMETERY_INDEX')}</a></li>
			<li><a href="{:url('Cemetery/add')}">{:lang('添加陵园')}</a></li>
			<li class="active"><a href="{:url('Cemetery/edit', array('id'=>$id))}">{:lang('修改陵园')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:url('Cemetery/edit_post')}">
			<fieldset>
				<input type="hidden" class="form-control" name="id" value="{$id}">
				<div class="control-group">
					<label class="control-label">上级:</label>
					<div class="controls">
						<select name="parentid" class="form-control">
							<option value="0">作为一级菜单</option>
							{$select_categorys}
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">名称:</label>
					<div class="controls">
						<input type="text" class="form-control" name="name" value="{$name}">
						<span class="form-required">*</span>
					</div>
				</div>
				<!--<div class="control-group">
					<label class="control-label">图片:</label>
					<div class="controls">
						<input type="text" class="form-control" name="icon" id="action">
						<a href="http://www.thinkcmf.com/font/icons" target="_blank">选择图片</a>
					</div>
				</div>-->
				<div class="control-group">
					<label class="control-label">备注:</label>
					<div class="controls">
						<textarea name="remark" class="form-control" rows="5" cols="57" style="width: 500px;" >{$remark}</textarea>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">状态:</label>
					<div class="controls">
						<select name="status" class="form-control">
							<option value="1" <if condition="$status eq 1">selected</if>>显示</option>
							<option value="0" <if condition="$status eq 0">selected</if>>隐藏</option>
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">是否生成墓区:</label>
					<div class="controls">
						<select name="is_generate" class="form-control">
							<option value="2" <if condition="$is_generate eq 2">selected</if>>否</option>
							<option value="1" <if condition="$is_generate eq 1">selected</if>>是</option>
						</select>
					</div>
				</div>
			</fieldset>
			<div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
	<script>
		$(function() {
			$(".js-ajax-close-btn").on('click', function(e) {
				e.preventDefault();
				Wind.use("artDialog", function() {
					art.dialog({
						id : "question",
						icon : "question",
						fixed : true,
						lock : true,
						background : "#CCCCCC",
						opacity : 0,
						content : "您确定需要关闭当前页面嘛？",
						ok : function() {
							setCookie('refersh_time_admin_menu_index', 1);
							window.close();
							return true;
						}
					});
				});
			});
		});
	</script>
</body>
</html>